/**
 * banner管理相关接口
 */

 import { Request, Response } from 'express';

 let addressData = [
   {user:'use1',phone:'13307309999',address:'22',id:1},
   {user:'uu2',phone:'13302809999',address:'323',id:2},
   {user:'ucc3',phone:'13308909999',address:'address3',id:3},
 ]
 let cateringData = [
   {username:'name1',order_id:'1',phone:'22223',address:'22323232',time:'2019/09/02',status:'completed'},
   {username:'name2',order_id:'2',phone:'22dd223',address:'22pluq32',time:'2019/09/01',status:'sending'},
   {username:'name3',order_id:'3',phone:'22hh223',address:'2op23232',time:'2019/08/02',status:'completed'},
 ]

 const getAddressListRequest = (req: Request, res: Response) => {
   res.json(addressData);
 };
 const getCateringList = (req:Request,res:Response) => {
   res.json(cateringData)
 }
 
 const updateRequest = (req:Request,res:Response) => {
  res.end('更新OK')
 }

 const deleteRequest = (req:Request,res:Response) => {
  res.end('删除OK')
}
const addRequest = (req:Request,res:Response) => {
  res.end('添加OK')
}
 
 export default {
   'GET /api/order/address/list': getAddressListRequest,
   'GET /api/order/cater/list': getCateringList,
   'POST /api/banner/update': updateRequest,
   'POST /api/banner/delete':deleteRequest,
   'POST /api/banner/add':addRequest,
 };
 